﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true" CodeBehind="Report.aspx.cs" Inherits="ESCHOOL.admin.WebForm5" Title="Report" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style3
        {
            width: 96%;
        }
        .style4
        {
            height: 30px;
        }
        .style5
        {
            width: 381px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p>
        &nbsp;</p>
<table class="style3">
    <tr>
        <td>
            &nbsp;</td>
    </tr>
</table>
<asp:Panel ID="Panel1" runat="server">
    <table style="width:100%">
        <tr>
            <td>
                <table class="style3">
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:TextBox ID="tbreportid" runat="server" Visible="False"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Name of Examination</td>
                        <td>
                            <asp:DropDownList ID="ddexam" runat="server">
                                <asp:ListItem>quarterly</asp:ListItem>
                                <asp:ListItem>half yearly</asp:ListItem>
                                <asp:ListItem>annual</asp:ListItem>
                                <asp:ListItem>three monthly</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Class Name</td>
                        <td>
                            <asp:DropDownList ID="ddlclassid" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="ddlclassid_SelectedIndexChanged">
                                
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Student Name</td>
                        <td>
                            <asp:DropDownList ID="ddlstudentid" runat="server" AutoPostBack="True" 
                                
                                onselectedindexchanged="ddlstudentid_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Roll No</td>
                        <td>
                            <asp:TextBox ID="tbrollno" runat="server" ReadOnly="True"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Subject Name</td>
                        <td>
                            <asp:DropDownList ID="ddlsubjectid" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Max Marks</td>
                        <td>
                            <asp:TextBox ID="tbtheorymax" runat="server" Width="77px"></asp:TextBox>
                            Theory</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:TextBox ID="tbpracmax" runat="server" Width="77px"></asp:TextBox>
                            Practical</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:TextBox ID="tbpromax" runat="server" Width="77px"></asp:TextBox>
                            Project</td>
                    </tr>
                    <tr>
                        <td>
                            Obtained marks</td>
                        <td>
                            <asp:TextBox ID="tbtheoryobt" runat="server" Width="77px"></asp:TextBox>
                            Theory</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:TextBox ID="tbpracobt" runat="server" Width="77px"></asp:TextBox>
                            Practical</td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:TextBox ID="tbproobt" runat="server" Width="77px"></asp:TextBox>
                            Project</td>
                    </tr>
                    <tr>
                        <td class="style4">
                            Remark
                        </td>
                        <td class="style4">
                            <asp:DropDownList ID="ddlremarkid" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style4" colspan="2">
                            <asp:Panel ID="Panel2" runat="server">
                                <table class="style3">
                                    <tr>
                                        <td class="style5">
                                            <asp:Label ID="lbtotal" runat="server" Text="Total Obt. marks/Total max marks"></asp:Label>
                                        </td>
                                        <td>
                                            &nbsp;<asp:TextBox ID="tbtobtmarks" runat="server" ReadOnly="True"></asp:TextBox>
                                            &nbsp;<asp:TextBox ID="tbtotmarks" runat="server" ReadOnly="True"></asp:TextBox>
                                            <p>
                                                &nbsp;</p>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            Percentage<asp:Label ID="lbpercent" runat="server" Text="Percentage"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="tbper" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            <asp:Label ID="lbgrade" runat="server" Text="Grade"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:TextBox ID="tbgrade" runat="server"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style5">
                                            &nbsp;</td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </td>
                    </tr>
                    <tr>
                        <td style="margin-left: 40px">
                            <asp:Button ID="btninsert" runat="server" onclick="btninsert_Click" 
                                Text="Insert" />
                        </td>
                        <td>
                            <asp:Button ID="btnupdate" runat="server" onclick="btnupdate_Click" 
                                Text="Update" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Panel>
<p>
                            &nbsp;</p>
    <asp:Panel ID="Panel3" runat="server">
    </asp:Panel>
    <asp:Panel ID="Panel4" runat="server" ScrollBars="Auto">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                                onrowdeleting="GridView1_RowDeleting" 
    onrowediting="GridView1_RowEditing" 
            onpageindexchanging="GridView1_PageIndexChanging">
            <Columns>
                <asp:BoundField DataField="examination" HeaderText="Examination" />
                <asp:BoundField DataField="class_name" HeaderText="Class Name" />
                <asp:BoundField DataField="roll_no" HeaderText="Roll No" />
                <asp:BoundField DataField="student_name" HeaderText="Student Name" />
                <asp:BoundField DataField="subject_name" HeaderText="Subject Name" />
                <asp:BoundField DataField="max_theorymarks" HeaderText="Max marks(Theory)" />
                <asp:BoundField DataField="max_practicalmarks" 
                                        HeaderText="Max marks(Practical)" />
                <asp:BoundField DataField="max_projectmarks" HeaderText="Max marks(Project)" />
                <asp:BoundField DataField="obt_theorymarks" HeaderText="Obt. marks(Theory)" />
                <asp:BoundField DataField="obt_practicalmarks" 
                                        HeaderText="Obt. marks(Practical)" />
                <asp:BoundField DataField="obt_projectmarks" HeaderText="Obt. marks(Project)" />
                <asp:BoundField DataField="total_maxmarks" HeaderText="Total Marks" />
                <asp:BoundField DataField="total_obtmarks" HeaderText="Total Obt. Marks" />
                <asp:BoundField DataField="percentage" HeaderText="Percentage" />
                <asp:BoundField DataField="grade" HeaderText="Grade" />
                <asp:BoundField DataField="remark_name" HeaderText="Remark " />
                <asp:TemplateField HeaderText="Edit">
                    <ItemTemplate>
                        <asp:Button ID="btnedit" runat="server" 
                                                CommandArgument='<%# Eval("report_id") %>' CommandName="Edit" 
                                                oncommand="btnedit_Command" Text="Edit" 
                            CausesValidation="False" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Delete">
                    <ItemTemplate>
                        <asp:Button ID="btndelete" runat="server" 
                                                CommandArgument='<%# Eval("report_id") %>' CommandName="Delete" 
                                                oncommand="btndelete_Command" Text="Delete" 
                            CausesValidation="False" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </asp:Panel>
    <p>
    </p>
    </asp:Content>
